<template>
  <div>
    <CategorySelector />
    <SpuList v-show="isShowSpuList" />
    <AddOrUpdateSpu v-show="!isShowSpuList" />
  </div>
</template>

<script>
import { mapState } from 'vuex'
import CategorySelector from '@comps/CategorySelector'
import SpuList from './components/SpuList'
import AddOrUpdateSpu from './components/AddOrUpdateSpu'

export default {
  name: 'Spu',
  components: {
    CategorySelector,
    SpuList,
    AddOrUpdateSpu
  },
  computed: {
    ...mapState({
      isShowSpuList: (state) => state.spu.isShowSpuList
    })
  }
}
</script>

<style lang="sass" scoped>
</style>
